package com.xlyy.modbus.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xlyy.modbus.entity.MyData;
import com.xlyy.modbus.entity.MyTestresult;
import com.xlyy.modbus.service.IMyTestresultService;
import com.xlyy.modbus.vo.MyTestresultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhoucanji
 * @since 2024-05-16
 */
@RestController
@RequestMapping("/myTestresult")
public class MyTestresultController {
    @Autowired
    IMyTestresultService myTestresultService;

    @GetMapping("/getMyTestresult")
    public MyTestresult getMyTestresult(String pch){
        return myTestresultService.getMyTestresult(pch);
    }

    @PostMapping("/saveUpdate")
    public boolean saveUpdate(@RequestBody MyTestresult myTestresult){
        return myTestresultService.saveUpdate(myTestresult);
    }

    @GetMapping("/findMyTestresultPage")
    public IPage<MyTestresult> findMyTestresultPage(MyTestresultVo myTestresultVo){
        return myTestresultService.findMyTestresultPage(myTestresultVo);
    }
}
